#define  _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    int findSpecialInteger(vector<int>& arr) {
        unordered_map<int, int> hash;
        for (auto num : arr)
            hash[num]++;
        for (auto& pair : hash)
            if (pair.second > arr.size() / 4)
                return pair.first;
        return 0;
    }
};